﻿<Window x:Class="_11.DataBinding.Converter"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:_11.DataBinding"
        Title="Converter" Height="102" Width="288">
    <Window.Resources>
        <local:Value2BrushConverter x:Key="converter"/>
    </Window.Resources>
    <StackPanel>
        <Label  BorderBrush="Black" BorderThickness="2"
               HorizontalContentAlignment="Center"
                FontWeight="ExtraBlack"
               Content="{Binding ElementName=slValue, Path=Value}"
                Foreground="{Binding ElementName=slValue, Path=Value,Converter={StaticResource converter}}"/>
        <Slider Name="slValue" Minimum="0" Maximum="100" />
    </StackPanel>
</Window>
